package com.dfrz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dfrz.entity.VideoDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 29877
 */
@Mapper
public interface VideoDetailMapper extends BaseMapper<VideoDetail> {
    //查询对应id的所有分集
    @Select("select * from video_detail where video_uid=#{vid}")
    List<VideoDetail> selectVideoByVid(Integer vid);

    List<VideoDetail> selectDetailByTitle(String word);

    VideoDetail getDetailInfoById(Integer vid);

    List<Object> getVideoByRandom(@Param("page")int page,@Param("pageNum") int pageNum);

    List<Object> getVideoByRandomM(@Param("page")int page,@Param("pageNum") int pageNum);

    List<Object> getMyVideo(@Param("userId") Integer userId,@Param("videoTitle") String videoTitle);

    List<Object> getVideoDetailAll(@Param("page")int page,@Param("pageNum") int pageNum);

    List<Object> getVideoDetailAllSearch(@Param("page")int page,@Param("pageNum") int pageNum,@Param("videoTitle") String videoTitle);
}
